package cn.legend.travel.ask.service;

import cn.legend.travel.ask.pojo.entity.Ask;
import cn.legend.travel.ask.pojo.param.AddNewAsksParam;
import cn.legend.travel.ask.pojo.vo.*;
import cn.legend.travel.common.pojo.authentication.CurrentPrincipal;
import cn.legend.travel.common.pojo.vo.PageData;
import cn.legend.travel.common.web.JsonResult;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface AskService {
    List<AskStandardVO> getAsks(Integer pageNum,Integer type,CurrentPrincipal currentPrincipal);

    void addAsks(AddNewAsksParam asksParam, CurrentPrincipal currentPrincipal);

    List<UserSortVo> getBestUsers(Integer time,Integer type);

    PageData<AnswerVo> getAnswers(Long questionId,Integer pageNum);

    PageData<AsksSearchVo> search(String keyword, Integer page);

    void addLikes(Long questionId,CurrentPrincipal currentPrincipal);

    void cancelLikes(Long questionId,CurrentPrincipal currentPrincipal);

    void AddViews(Long questionId);

    void report(Long questionId);

    List<AskSimple> getByCity(String city);

    Ask getAskById(Long questionId);
}
